
#include "IGlobal.h"
#include "member_BTextFormat.h"

using namespace BWE;

member_BTextFormat::member_BTextFormat(BTextFormat* textFormat)
{
	boss = textFormat;
	host = 0;
	parent = 0;
}
member_BTextFormat::~member_BTextFormat()
{

}

void member_BTextFormat::setWidget(BWidget* newWidget)
{
	if (host != newWidget)
	{
		if (host)
		{
			boss->detached(host);
			boss->emit(Signal_Detached, BValue(newWidget, true));
		}
		host = newWidget;
		if (host)
		{
			boss->attached(newWidget);
			boss->emit(Signal_Attached, BValue(newWidget, true));
		}
	}
}
